home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
TPUG - Toronto PET Users Group
/
TPUG Users Group CD
/
TPUG Users Group CD.iso
/
C64
/
H-Graphics
/
(c)h4.d64
/
Kkoala simon
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2007-02-04
|
7KB
|
197 lines
5 REM ********************************* * *
10 REM* KOALA SIMON * * BY *
15 REM* ROGER D. BURGE * * TPUG #2667 *
20 REM* TORONTO PET USERS GROUP INC. * * TORONTO, CANADA *
25 REM* FOR THE COMMODORE 64 * * & KOALA PAD *
30 REM* (TM.)KOALA TECHNOLOGIES CORP. * * VERSION 1.0/ AUGUST, 1984 *
35 REM* CATEGORY: RECREATIONAL, * * EDUCATIONAL *
40 REM* * *********************************
45 CLR:GOSUB320:GOSUB215:GOSUB690:GOSUB360
50 GOSUB640
55 PC=1:P(1)=1:P(2)=1
60 PRINT"[158]"P$(PC)T$:FORT=.TO250:NEXT:NU=.
65 FORT=.TOWT*6:NEXT
70 PRINTS$(PC):GOSUB175
75 PRINT""S$(PC):AN$(PC)="":FORJ=1TONU:TI$="000000"
80 PRINTP$(.)MID$(TI$,5);"":IFTI>TLTHENJ=NU:GOSUB615:GOTO135
85 SYS820:IFPEEK(252)<7THENSP=.:GOTO95
90 SP=INT((PEEK(252)-7)/63.75)+1
95 POKEV+1,AP(SP)
100 SYS820:IFPEEK(253)=.ORSP=.THEN80
105 AN$(PC)=AN$(PC)+CHR$(SP)
110 IFAN$(PC)<>LEFT$(P$(PC+2),J)THENJ=NU:GOSUB625:GOTO135
115 GOSUB200:IFJ-1=S(PC)THENS(PC)=S(PC)+1:PRINTS$(PC)S(PC)
120 IFS(PC)=128THENNU=NU-1:H(PC)=128:GOSUB945:GOTO140
125 IFS(PC)>H(PC)THENH(PC)=S(PC):PRINTS$(PC+2)H(PC)
130 NEXT:POKEV+1,AP(.):GOTO65
135 PRINT"[158]"P$(PC)"[157][157][157][157][157][157][157][157][157][157] SORRY! ":NU=NU-1:FORT=.TO1499:NEXT
140 POKEV+1,AP(.):GOSUB175:IFP+PC=3THENPRINTLEFT$(C$(.),Z)SPC(20)"[153] TRADE PAD "
145 FORT=.TO2999:NEXT:IFP=2THENPRINTLEFT$(C$(.),Z)SPC(20)" "
150 IFS(PC)<128THENPRINT""P$(PC)"[157][157][157][157][157][157][157][157][157][157][146] "
155 IFP=1THENGOTO535
160 IFP=2THENPRINT""P$(PC)"[146]"S$(PC):P(PC)=.:PC=PC+1:IFPC=3THENPC=1
165 IFP(PC)=.THEN535
170 GOTO60
175 NU=NU+1:FORU=1TONU:PRINTG$(ASC(MID$(P$(PC+2),U)))
180 POKES+1,15+ASC(MID$(P$(PC+2),U))^2.7:POKES+4,17
185 POKEV+1,AP(ASC(MID$(P$(PC+2),U)))
190 FORT=.TODU:NEXT:POKES+4,.:PRINTF$(ASC(MID$(P$(PC+2),U)))
195 FORTT=.TOWT:NEXT:NEXT:POKEV+1,AP(.):RETURN
200 PRINTG$(SP)
205 POKES+1,15+(SP)^2.7:POKES+4,17:FORT=.TODU:NEXT:POKES+4,.
210 PRINTF$(SP):FORT=.TOWT:NEXT:RETURN
215 C$(1)="[158]":C$(2)="[153]":C$(3)="[159]":C$(4)="[150]":C$(.)=""
220 C=2:FORT=1TO4
225 F$(T)=" [213][192][201] [157][157][157][157][157] [221]K[221] [157][157][157][157][157] [202][192][203] "
230 C=C+4:F$(T)=LEFT$(C$(.),C)+F$(T):G$(T)=F$(T)
235 F$(T)=C$(T)+F$(T):G$(T)=""+G$(T):NEXT
240 F$(.)="[146][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
245 F$(.)=F$(.)+"[221][155] KOALA SIMON [146][221]"
250 F$(.)=F$(.)+"[171][192][192][192][192][192][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][192][192][192][192][178][192][192][192][192][192][192][192][192][192][192][192][192][192][179]"
255 G$(.)="[147][146][171][192][192][192][192][192][192][192][192][192][192][192][192][192][177][192][192][192][192][192][192][192][192][192][192][177][192][192][192][192][192][192][192][192][192][192][192][192][192][179]"
260 G$(.)=G$(.)+ "[221][155] BY ROGER D. BURGE [146][221]"
265 P$(.)="":N$(.)=""+LEFT$(P$(.),14)+"[221]"
270 P$(1)=LEFT$(C$(.),7)+P$(.)+" PLAYER 1:"
275 P$(2)=LEFT$(C$(.),15)+P$(.)+" PLAYER 2:"
280 N$(1)="":N$(2)="":N$(3)="":N$(4)=""
285 S$(1)=LEFT$(C$(.),11)+" SCORE:"
290 S$(2)=LEFT$(C$(.),19)+" SCORE:"
295 S$(3)=""+LEFT$(C$(.),9)+" HIGH: "
300 S$(4)=""+LEFT$(C$(.),17)+" HIGH: ":S$(.)=""
305 T$=C$(.)+"[146][213][192][192][192][192][192][192][192][192][192][192][201][157][157][157][157][157][157][157][157][157][157][157][157][221][155] TIMER:00 [146][221]"
310 P$(.)=LEFT$(T$,72)
315 RETURN
320 DIMC$(4),F$(4),G$(4),P$(4),N$(4),S$(4),S(2),H(2),P(2),AP(4)
325 T=RND(-TI):V=53248:VC=V+39:VX=V+17:Z=13
330 POKEV+39,1:POKEV+16,.:POKEV+23,.:POKEV+29,1:POKEV+28,.:POKE2040,14
335 FORT=.TO26:READTT:POKE896+T,TT:NEXT:FORT=27TO63:POKE896+T,.:NEXT
340 POKEV+21,.
345 FORT=820TO870:READA:POKET,A:NEXT
350 AP(.)=145:AP(1)=97:AP(2)=129:AP(3)=162:AP(4)=194
355 RETURN
360 POKEVX+16,1:POKEVX+15,1:GOSUB470
365 PRINTS$(.);"[194]UTTON #1: [201]NSTRUCTIONS
370 [153]"PEEKUTTON #2: (null)LAY (null)OALA (null)IMON
375 PRINT"[194]UTTON #1 + #2: [210]ETURN TO MENU
380 [129]T[178].[164]333:[158]820:[130]:BS[178][194](253):[139]BS[178].[167]380[178].[167]380
385 [145]BS[137]805,390,970
390 [141]470:[153]S$(.);" LEFT$OW MANY PLAYERS?
395 PRINTSPC(Z)"[194]UTTON #1: ONE":PRINTSPC(13)"[194]UTTON #2: TWO
400 [129]T[178].[164]250:[130]
405 [141]940:P[178]BS:[139]P[179]1[176]P[177]2[167]405
410 P[178][194](253)
415 [141]470:[153]S$(.)"(null)KILL LEVEL?
420 PRINTSPC(10)"[194]UTTON #1: LEVEL ONE
425 [153][166]10)"PEEKUTTON #2: LEVEL TWO
430 FORT=.TO250:NEXT
435 GOSUB940:L=BS:IFL<1ORL>2THEN435
440 L=L-1
445 N$(.)=LEFT$(N$(.),20)+"[155] LEVEL: "+MID$(STR$(L+1),2)+" [146][221][157][157][157][157][157][157][157][157][157][157][157][157]"
450 N$(.)=N$(.)+"[202][192][192][192][192][192][192][192][192][192][192][203]"
455 IFLTHENDU=375:WT=50:TL=180:GOTO465
460 DU=750:WT=99:TL=300
465 POKEVX+16,.:POKEVX+15,.:PRINT"[142]":RETURN
470 POKEVX,PEEK(VX)AND239:PRINT"[147]";:POKEV+21,.
475 PRINT"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
480 PRINT"[221] [203][207][193][204][193] [211][201][205][207][206] [221]";
485 PRINT"[221] BY [210]OGER [196]. [194]URGE [221]";
490 PRINT"[171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]";
495 FORT=.TO14:PRINT"[221]";SPC(38)"[221]";:NEXT
500 PRINT"[171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]";
505 PRINT"[221][144][146] *[212][205] [203]OALA [212]ECHNOLOGIES [195]ORPORATION [221]";
510 PRINT"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]";
515 PRINT"[157][148][148]":POKE218,132
520 PRINT"[144][176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]";
525 PRINT"[221] [193] [203][207][193][204][193] [208][193][196] * - [195][207][205][205][207][196][207][210][197] 64 [208][210][207][199][210][193][205] [221]";
530 PRINT"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]":POKEVX,PEEK(VX)OR16:RETURN
535 IFP=1THENH=1:PRINT"[146]"S$(1):GOTO575
540 IFH(1)=H(2)THENFORT=1TO2:PRINT"[159]"MID$(S$(T+2),2)H(T)"[157] ":NEXT:GOTO555
545 IFH(1)>H(2)THENH=1:GOTO555
550 H=2
555 IFS(1)=S(2)THENFORT=1TO2:PRINT"[158]"P$(T)S$(T)S(T)"[157] ":NEXT:GOTO580
560 IFS(1)>S(2)THENW=1:GOTO570
565 W=2
570 PRINT"[158]"P$(W)S$(W)S(W)"[157] "
575 PRINT"[159]"MID$(S$(H+2),2)H(H)"[157] "
580 PRINTC$(.)"[171][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][179]";
585 PRINT"[153] #1 =REPLAY[221] #2 = QUIT[221] #1+2 =RESTART "
590 PRINTLEFT$(N$(.),21)"[153] BUTTONS: "
595 FORT=.TO333:SYS820:NEXT:IFPEEK(253)=.THEN595
600 ONPEEK(253)GOTO605,45,610
605 FORT=1TOP:S(T)=.:P$(T+2)="":NEXT:GOTO50
610 FORT=1TO2:S(T)=.:P$(T+2)="":H(T)=.:POKEVX+14+T,1:NEXT:GOSUB390:GOTO50
615 FORT=1TO4:PRINTG$(T):NEXT:PRINTP$(.)"[157][157][157][157][157][157][157][158] TIMER:"MID$(TI$,5);" "
620 GOTO630
625 PRINTG$(SP)
630 POKES+1,12:POKES+4,33:FORT=.TO999:NEXT:POKES+4,.
635 FORT=1TO4:PRINTF$(T):NEXT:FORT=.TO400:NEXT:RETURN
640 POKEVX,PEEK(VX)AND239:PRINTG$(.);
645 PRINT"[146][173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
650 FORT=.TO18:PRINT"[157][148][148]":POKE218,PEEK(648)+128:NEXT:PRINTF$(.);
655 FORT=.TO18:PRINT"[221] [221]";:NEXT
660 FORT=1TO4:PRINTF$(T):NEXT:PRINTT$:POKEV,81:POKEV+1,AP(.):POKEV+21,1
665 PRINT""SPC(14)"[158]PLEASE WAIT!"
670 POKEVX,PEEK(VX)OR16:GOSUB700
675 FORT=1TOP:PRINT""P$(T):NEXT
680 FORT=1TOP:PRINTS$(T)S(T)S$(T+2)H(T):NEXT
685 PRINTN$(.):POKEVX,PEEK(VX)OR16:RETURN
690 S=54272:FORT=STOS+24:POKET,.:NEXT
695 POKES+24,15:POKES+5,003:POKES+6,128:POKES,10::RETURN
700 FORT=3TOP+2
705 FORTT=1TO128:P$(T)=P$(T)+N$(RND(1)*4+1):POKEVC,TT:NEXT:NEXT:POKEVC,1
710 RETURN
715 DATA15,255,255
720 DATA31,51,7
725 DATA63,51,51
730 DATA127,51,51
735 DATA255,7,7
740 DATA127,51,63
745 DATA63,51,63
750 DATA31,51,63
755 DATA15,255,255
760 DATA162,128,202,224,0,208,251
765 DATA173,25,212,133,251
770 DATA173,26,212,133,252
775 DATA173,1,220
780 DATA41,12,201,4,208,4,169,2,208,18
785 DATA201,8,208,4,169,1,208,10
790 DATA201,0,208,4,169,3,208,2
795 DATA169,0,133,253
800 DATA96
805 GOSUB470:PRINTS$(.);"[212]HE OBJECT OF THIS GAME IS TO DO AS "
810 PRINT"[145][203]OALA [211]IMON SAYS."
815 PRINT"[211]IMON WILL PLAY A TUNE FOR YOU. [212]HE
820 [153]"SONG IS COMPOSED FROM FOUR NOTES. VALACH
825 PRINT"[145]OF THESE FOUR NOTES IS REPRESENTED BY
830 [153]"A DIFFERENT COLOUR SQUARE THAT (null)IMON
835 PRINT"[145]WILL LIGHT AS THE NOTE IS PLAYED.
840 [153]"(null)HE SONG STARTS OFF ONLY ONE NOTE
845 PRINT"LONG. [215]ITH EACH TURN YOU TAKE HE WILL
850 [153]"ONADD ANOTHER NOTE. (null)OU MUST PLAY BACK
855 PRINT"THE TUNE EXACTLY AS HE PLAYED IT.
860 [153]" PRESS A BUTTON TO CONTINUE "
865 [129]T[178].[164]250:[130]
870 [141]940:[139]BS[178].[167]870
875 [141]470:[153]S$(.);"(null)O PLAY A NOTE MOVE THE STYLUS
880 PRINT"[145]VERTICALLY OVER YOUR [203]OALA [208]AD*. [212]HIS
885 [153]"WILL MOVE THE WHITE ARROW UP AND DOWN.
890 PRINT"[145][215]HEN THE ARROW IS POINTING TO THE
895 [153]"COLOURED SQUARE REPRESENTING THE NOTE
900 PRINT"[145]YOU WISH TO PLAY , PRESS A BUTTON.
905 [153]"RIGHT$F YOU PLAY A NOTE OUT OF SEQUENCE OR TAKE TOO LONG ";
910 [153]"THEN IT'S GAME OVER!
915 PRINT"[211]IMON WILL THEN PLAY BACK THE SONG
920 [153]"ONTHAT STUMPED YOU.
925 PRINT" PRESS A BUTTON TO PLAY ":FORT=.TO250:NEXT
930 GOSUB940:IFBS=.THEN930
935 GOTO390
940 FORT=.TO250:NEXT:SYS820:BS=PEEK(253):RETURN
945 FORT=.TOZ
950 POKES+1,50:POKES+4,33:FORTT=.TO150:NEXT:POKES+4,.
955 POKE646,T:PRINTLEFT$(C$(.),8+8*-(PC=2))SPC(17)" ALL TIME HIGH SCORE! "
960 POKE646,T+6:PRINT""MID$(S$(PC+2),2)H(PC)
965 FORTT=.TO09:NEXT:NEXT:RETURN
970 SYS820:IFPEEK(253)THEN970
975 POKEV+21,.:POKEV+29,.:POKE198,.:PRINT" [146][147][142]L[207]"CHR$(34)"[139]"CHR$(34)",8"
980 POKE198,5:POKE631,Z:POKE632,82:POKE633,85:POKE634,78:POKE635,Z:END